fix: fix type for Header.schema fixed field#4906
Conversation
|
Huh. We fixed this in 3.2 and must have missed it in 3.1. |
|
Thats funny I ran into this same issue last week! |
|
@amritk This is just a bug, so definitely treat it as Schema Object-only in any implementation. Anything in 3.1 where either the Schema Object or the Path Item Object is said to have a Reference Alternative is an error, as both of those Objects already have their own |
|
@handrews does this mean any object can have a $ref now as it would be part of json schema? |
|
@amritk no I just mean that in OAS 3.1 (and later), the Schema Object includes JSON Schema's The thing with the Path Item Object dates back to 2.0 and is a different kind of weird. It also defines its own Everything else needs to allow a Reference Object in order to use |
|
Got you! Thanks for the clarification! We'll make those changes later this week |
Affected section: https://spec.openapis.org/oas/v3.1.1.html#fixed-fields-for-use-with-schema-0
Schema Object | Reference Objectwould create ambiguity as both objects can only have$reffield. WhenSchema Objectis a type for a field, it shouldn't use union withReference Objectas theSchema Objectis already reference-able by itself.